<extend name="Public:base"/>

<block name="main">

    <div id="main-box">
        <div class="main-title">
            <h2>添加节点</h2>
        </div>

        <form id="myform" class="form-horizontal" action="{:U('Node/insert')}" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label">分组</label>
                <div class="col-xs-4">
                    {:Form::select(array('field'=>'groupid','options'=>$groups,'options_key'=>'id,name','class'=>"form-control"),$groupid)}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">名称</label>
                <div class="col-xs-4">
                    <input type="text" class="form-control" name="name" validate="required:true,en_num:true, minlength:2, maxlength:20" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">标题</label>
                <div class="col-xs-4">
                    <input type="text" name="title" class="form-control" validate="required:true,cn_username:true, minlength:2, maxlength:20" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">上级</label>
                <div class="col-xs-4">
                    <select class="form-control" name="pid">
                        <option value="0">一级菜单</option>
                        {$nodes}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">描述</label>
                <div class="col-xs-4">
                    <textarea  id="remark" name="remark" rows="3" cols="40" class="form-control">{$udate['remark']}</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">状态</label>
                <div class="col-xs-4">
                    <input type="radio" name="status" value="1" checked="checked"/>启用
                    <input type="radio" name="status" value="0" />禁用
                </div>
            </div>

            <div class="form-actions">
                <input type="submit" value="{:L('dosubmit')}" class="btn btn-sm btn-primary" >
                <input type="reset" value="{:L('cancel')}" class="btn btn-sm btn-primary">
                <input type="hidden" name="forward" value="{$_SERVER['HTTP_REFERER']}" />
            </div>
        </form>
    </div>
</block>